const { ipcMain, BrowserWindow, Tray, Menu } = require('electron');
const path = require('path');

function SettingWindow(debug = false) {
    // 打开设置窗口
    var settingWindow;
    this.createWindow = function() {
        settingWindow = new BrowserWindow({
            width: 800,
            height: 600,
            webPreferences: {
                nodeIntegration: true,
                defaultFontFamily: {
                    standard:"WenQuanYi Micro Hei",
                }
            },
            //frame: false,
        });
        settingWindow.loadURL(path.join(__dirname, '../html/setting.html'));
        if (debug) {
            settingWindow.webContents.openDevTools();
            settingWindow.maximize();
        }
        settingWindow.on('closed', function () {
            settingWindow = null;
        });
        return settingWindow;
    };
}
module.exports = SettingWindow;